package com.atguigu.lease.web.app.context;

import com.atguigu.lease.model.entity.UserInfo;

public class LocalContext {


    private static final ThreadLocal<UserInfo> threadLocal = new ThreadLocal<>();

    public static UserInfo getUserInfo(){
        return threadLocal.get();
    }
    public static void setUserInfo(UserInfo userInfo){
        threadLocal.set(userInfo);
    }

    public static void remove(){
        threadLocal.remove();
    }
}
